Atelierul Sketcher Workbench este utilizat pentru a crea forme geometrice 2D cu intenția de a le utiliza în Atelierul PartDesign Workbench, Arch Workbench, și alte ateliere. În general, o geometrie 2D este considerată punctul de plecare pentru majoritatea modelelor CAD, deoarece o schiță 2D poate fi "extrudată" pentru a crea o formă 3D; mai mult, schițele 2D pot fi folosite pentru a crea alte caracteristici cum ar fi cavități, creste sau extrudări peste formele 3D construite anterior. Împreună cu operațiile booleene pe solide definite în Part Workbench, Sketcher-ul formează nucleul de design generativ al formei solide.
Together with boolean operations defined in the Part Workbench, the Sketcher Workbench, or "The Sketcher" for short, forms the basis of the constructive solid geometry (CSG) method of building solids. Together with
PartDesign Workbench operations, it also forms the basis of the feature editing methodology of creating solids. But many other workbenches use sketches as well.
Atelierul de lucru Sketcher pune pe primul loc ”constrângerile” - permițând definirea formelor 2D după criterii geometrice precise. Un solver matematic de constrângeri calculează nivelul constrângerii și permite explorarea interactivă a gradelor de libertate.
Instrumentul Sketcher nu este destinat pentru realizarea planurilor 2D. Odată ce schițele sunt folosite pentru a genera o caracteristică solidă, ele sunt ascunse automat. Constrângerile sunt vizibile numai în modul Editare schiță.
A fully constrained sketch
În loc de dimensiuni, constrângerile sunt folosite pentru a limita gradul de libertate al unui obiect. De exemplu, o linie fără constrângeri are 4 Degrees of Freedom (abreviat ca "DOF"): poate fi mișcat orizontal sau vertical, poate fi întinsă și poate fi rotită.
Aplicarea unei constrângeri orizontale sau verticale sau a unei constrângeri de unghi (relativ la o altă linie sau la una dintre axe) va limita capacitatea sa de a se roti, lăsându-l astfel cu 3 grade de libertate. Blocarea unuia dintre punctele sale în raport cu originea va elimina încă 2 grade de libertate. Și aplicarea unei constrângeri de dimensiune va elimina ultimul grad de libertate. Linia este apoi considerată complet constrânsă .
Obiectele multiple pot fi constrânse între ele. Două linii pot fi unite prin unul dintre punctele lor cu constrângerea punctului coincident. Un unghi poate fi setat între ele sau poate fi setat perpendicular. O linie poate fi tangentă la un arc sau un cerc și așa mai departe. O schiță complexă, cu obiecte multiple, va avea o serie de soluții diferite, ceea ce înseamnă că "una dintre aceste soluții posibile a fost atinsă pe baza constrângerilor aplicate.
Există două tipuri de constrângeri: geometrice și dimensionale. Acestea sunt detaliate în secțiunea 'Instrumentele' de mai jos.
When a driving dimensional constraint is created, and if the Ask for value after creating a dimensional constraint preference is selected (default), a dialog opens to edit its value.
You can enter a numerical value or an expression, and it is possible to name the constraint to facilitate its use in other expressions. You can also check the Reference checkbox to switch the constrain to reference mode.
To edit the value of an existing dimensional constraint do one of the following:
Dimensional constraints can be repositioned in the 3D view by dragging. Hold down the left mouse button over the constraint value and move the mouse. The symbols of geometric constraints are positioned automatically and cannot be moved.
To create a sketch that can be used as a profile for generating solids certain rules must be followed:
These rules do not apply to construction geometry (default color blue), which is not shown outside edit mode, or if the sketch is used for a different purpose. Depending on the workbench and the tool that will use the profile sketch, additional restrictions may apply.
Instrumentele Sketcher Workbench sunt toate localizate în meniul Sketch care apare atunci când încărcați Sketcher Workbench.
Some tools are also available from the 3D view context menu while a sketch is in edit mode, or from the context menus of the Sketcher Dialog.
introduced in 0.21: If a sketch is in edit mode the Structure toolbar is hidden as none of its tools can then be used.
Aceste unelte se folosesc la crearea obiectelor.
Constrângerile sunt folosite pentru a defini lungimile, a stabili reguli între elementele de schiță și pentru a bloca schița de-a lungul axelor verticale și orizontale. Unele constrângeri necesită utilizarea Helper constraints.
Fixează distanța orizontală dintre două puncte sau puncte finale. Dacă este selectat un singur element, distanța este setată față de origine.
Fixează distanța verticală între 2 puncte sau puncte de capăt ale liniei. Dacă este selectat un singur element, distanța este setată față de origine.
Definește distanța unei linii selectate prin limitarea lungimii acesteia sau definește distanța dintre două puncte prin limitarea distanței dintre ele.
Definește raza unui arc de cerc sau cerc selectat prin limitarea razei.
Definește unghiul interior dintre două linii selectate.
Constrânge liniile selectate sau elementele de polilinie la o orientare orizontală reală. Pot fi selectate mai multe obiecte înainte de aplicarea acestei constrângeri.
Practic permite blocarea unui element geometric în loc cu o singură constrângere. Ar trebui să fie deosebit de util să lucrați cu acest la curbele B-Splines. A se vedea Block Constraint forum topic. introduced in 0.17
The Sketcher Workbench has several drawing aids and other features that can help when creating geometry and applying constraints.
There are two continue modes: Geometry creation "Continue Mode" and Constraint creation "Continue Mode". If these are checked (default) in the preferences, related tools will restart after finishing. To exit a continuous tool press Esc or the right mouse button. This must be repeated if a continuous geometry tool has already received input. You can also exit a continuous tool by starting another geometry or constraint creation tool. Note that pressing Esc if no tool is active will exit sketch edit mode. Uncheck the Esc can leave sketch edit mode preference if you often inadvertently press Esc too many times.
In sketches that have Auto constraints checked (default) several constraints are applied automatically. The icon of a proposed automatic constraint is shown next to the cursor when it is placed correctly. Left-clicking will then apply that constraint. This is a per-sketch setting that can be changed in the Sketcher Dialog or by changing the VizualizareAutoconstraints property of the sketch.
The following constraints are applied automatically:
It is possible to snap to grid lines and grid intersection, to edges of geometry and midpoints of lines and arcs, and to certain angles. Please note that snapping does not produce constraints in and of itself. For example, only if Auto constraints is switched on will snapping to an edge produce a Point on object constraint. But just picking a point on the edge would then have the same result.
Depending on the selected option in the preferences only the dimensional On-View-Parameters or both the dimensional and the positional On-View-Parameters can be enabled. Positional parameters allow the input of exact coordinates, for example the center of a circle, or the start point of a line. Dimensional parameters allow the input of exact dimensions, for example the radius of a circle, or the length and angle of a line. On-View-Parameters are not available for all tools.
Determining the center point of a circle with the positional parameters enabled
Determining the radius of a circle with the dimensional parameters enabled
If values are entered and confirmed by pressing Enter or Tab, related constraints are added automatically. If two parameters are displayed at the same time, for example the X and Y coordinate of a point, it is possible to enter one value and pick a point to define the other. Depending on the object additional constraints may be required to fully constrain it. Constraints resulting from On-View-Parameters take precedence over those that may result from Auto constraints.
Arc created by entering all On-View-Parameters with resulting automatically created constraints
If the Show coordinates beside cursor while editing preference is checked (default), the parameters of the current geometry tool (coordinates, radius, or length and angle) are displayed next to the cursor. This is deactivated while On-View-Parameters are shown.
While a sketch is in edit mode the following selection methods can be used:
As elsewhere in FreeCAD, an element can be selected in the 3D view with a single left mouse click. But there is no need to hold down the Ctrl key when selecting multiple elements. Holding down that key is possible though and has the advantage that you can miss-click without losing the selection. Edges, points and constraints can be selected in this manner.
Box selection in the 3D view works without using Std BoxSelection or Std BoxElementSelection:
You can box-select edges and points, constraints cannot be box-selected.
Double-clicking an edge in the 3D view will select all edges directly and indirectly connected with that edge via endpoints. There is no need for the edges to be connected with Coincident constraints, endpoints need only have the same coordinates.
Edges and points can also be selected from the Elements section of the Sketcher Dialog, and constraints from the Constraints section of that dialog.
The standard keyboard shortcuts, Ctrl+C, Ctrl+X and Ctrl+V, can be used to copy, cut and paste selected Sketcher geometry including related constraints. But these tools are also available from the Sketch → Sketcher tools menu. They can be used within the same sketch but also between different sketches or separate instances of FreeCAD. Since the data is copied to the clipboard in the form of Python code, it can be used in other ways too (e.g. shared on the forum).
Fiecare utilizator CAD își dezvoltă în timp propriul mod de a lucra, dar există câteva principii generale utile care trebuie urmate.
The phenomenon that a fully constrained sketch, usually after a major change to one of its dimensions, reaches an unintended new state is know as "flipping". In the example below, changing one dimension completely changes the shape of the sketch. Note that the sketch with the new shape is still fully constrained.
Original sketch (left), and the same sketch after increasing the 20mm value to 1000mm (right)
This is not always practical, but changing dimension values in smaller increments can work.
The LevenbergMarquardt solver, which is not the default solver, is known to be less prone to flipping. See Sketcher Dialog for more information.
Using horizontal and vertical dimensions instead of equal constraints can prevent flipping. Points constrained by these dimensions will not switch places. In the image above the added (orange) dimensional constraints are linked to the original dimensions via expressions.
Using angular dimensions instead of horizontal and vertical constraints can also work. The angle between edges constrained by angular dimensions will not change. 180° will not become 0°, 90° will not become 270°, etc. In the image all horizontal and vertical constraints have been replaced, but just replacing two is already effective here.
The Sketcher scripting page contains examples on how to create constraints from Python scripts.
For some ideas of what can be achieved with Sketcher tools, have a look at: Sketcher examples.